<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width: 0;
      height: 0;
      border: 100px solid ;
      border-color: transparent #0099CC transparent transparent;
      transform: rotate(90deg);
    }
  </style>
</head>
<body>
  <div class="box"></div>
  <button id="btn">获取数据</button>
  <script>
    const btn =  document.getElementById('btn')
    btn.onclick = () => {
      fetch('http://127.0.0.1:8888/api/seller')
      .then(res => res.json())
      .then(resp => {
        console.log(resp)
      })
    }
    // function fn(n1, n2) {
    //   const n = n1 + n2
    //   if (n2+1 > 100) {
    //     return n
    //   } else {
    //     return fn(n, n2+1)
    //   }
    // }
    // console.log(fn(1,2))
    // const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 56]
    // arr.map(item => {
    //   // console.log(arr.indexOf(56 / item))
    //   if (arr.indexOf(30 / item) !== -1) {
    //     // return arr
    //     return console.log(arr[arr.indexOf(30 / item)])
    //   } else {
    //     return console.log('no')
    //   }
    // })

    for (let i=0; i<3; i++) {
      setTimeout(() => {
        console.log(i)
      }, 1000);
    }

  </script>
</body>
</html>